package ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller.test;

import net.wimpi.modbus.io.ModbusTransport;
import ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller.factories.ModbusTransportFactory;

public class MockModbusTransportFactory implements ModbusTransportFactory {

	private ModbusTransport mock;
	@Override
	public ModbusTransport connect(String ip, Integer port) {
		try {Thread.sleep(100);} catch (InterruptedException e) {}
		return mock;
	}
	/**
	 * @return the mock
	 */
	public ModbusTransport getMock() {
		return mock;
	}
	/**
	 * @param mock the mock to set
	 */
	public void setMock(ModbusTransport mock) {
		this.mock = mock;
	}

}
